package com.lc.convert;

import org.springframework.core.convert.converter.Converter;

import com.lc.vo.Girl;

public class GirlConverter implements Converter<String, Girl> {

	@Override
	public Girl convert(String source) {
		System.out.println(source);
		String[] girls = source.split("\\|");
		Girl girl = new Girl();
		girl.setId(girls[0]);
		girl.setName(girls[1]);
		girl.setAge(Integer.valueOf(girls[2]));
		return girl;
	}
}
